package ua.exchangeratesukraine.model;

import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

public class CurrencyModel implements Parcelable, Serializable {

	private String	date;
	private String	code;
	private String	name;
	private String	nominal;
	private String	rate;
	private String	changeAbs;
	private String	changeRel;

	private String	currency;
	private String	buy;
	private String	buyChangeAbs;
	private String	buyChangeRel;
	private String	sale;
	private String	saleChangeAbs;
	private String	saleChangeRel;

	
	public CurrencyModel() {
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNominal() {
		return nominal;
	}

	public void setNominal(String nominal) {
		this.nominal = nominal;
	}

	public String getRate() {
		return rate;
	}

	public void setRate(String rate) {
		this.rate = rate;
	}

	public String getChangeAbs() {
		return changeAbs;
	}

	public void setChangeAbs(String changeAbs) {
		this.changeAbs = changeAbs;
	}

	public String getChangeRel() {
		return changeRel;
	}

	public void setChangeRel(String changeRel) {
		this.changeRel = changeRel;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel parcel, int flags) {
		parcel.writeString(date);
		parcel.writeString(name);
		parcel.writeString(code);
		parcel.writeString(nominal);
		parcel.writeString(rate);
		parcel.writeString(changeAbs);
		parcel.writeString(changeRel);
		
		parcel.writeString(buy);
		parcel.writeString(buyChangeAbs);
		parcel.writeString(buyChangeRel);
		parcel.writeString(sale);
		parcel.writeString(saleChangeAbs);
		parcel.writeString(saleChangeRel);

	}

	public static final Creator<CurrencyModel>	CREATOR	= new Parcelable.Creator<CurrencyModel>() {
				// data extract from Parcel
				public CurrencyModel createFromParcel(Parcel in) {
					return new CurrencyModel(in);
				}

				public CurrencyModel[] newArray(int size) {
					return new CurrencyModel[size];
				}
			};

	// constructor, data reads from the Parcel
	private CurrencyModel(Parcel parcel) {
		date = parcel.readString();
		name = parcel.readString();
		code = parcel.readString();
		nominal = parcel.readString();
		rate = parcel.readString();
		changeAbs = parcel.readString();
		changeRel = parcel.readString();
		
		buy = parcel.readString();
		buyChangeAbs = parcel.readString();
		buyChangeRel = parcel.readString();
		sale = parcel.readString();
		saleChangeAbs = parcel.readString();
		saleChangeRel = parcel.readString();

	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getBuy() {
		return buy;
	}

	public void setBuy(String buy) {
		this.buy = buy;
	}

	public String getBuyChangeAbs() {
		return buyChangeAbs;
	}

	public void setBuyChangeAbs(String buyChangeAbs) {
		this.buyChangeAbs = buyChangeAbs;
	}

	public String getBuyChangeRel() {
		return buyChangeRel;
	}

	public void setBuyChangeRel(String buyChangeRel) {
		this.buyChangeRel = buyChangeRel;
	}

	public String getSale() {
		return sale;
	}

	public void setSale(String sale) {
		this.sale = sale;
	}

	public String getSaleChangeAbs() {
		return saleChangeAbs;
	}

	public void setSaleChangeAbs(String saleChangeAbs) {
		this.saleChangeAbs = saleChangeAbs;
	}

	public String getSaleChangeRel() {
		return saleChangeRel;
	}

	public void setSaleChangeRel(String saleChangeRel) {
		this.saleChangeRel = saleChangeRel;
	}
}